module.exports = {
    extends: [
        'alloy',
        'alloy/react',
        'alloy/typescript'
    ],
    globals: {
        // 这里填入你的项目需要的全局变量
        // 这里值为 false 表示这个全局变量不允许被重新赋值，比如：
        //
        // jQuery: false,
        // $: false
    },
    rules: {
        'object-shorthand': ['error', 'always'],
        "prefer-destructuring": ["error", {
            "array": true,
            "object": true
        }, {
                "enforceForRenamedProperties": false
            }],
        "prefer-const": ["error", {
            "destructuring": "any",
            "ignoreReadBeforeAssign": false
        }],
        "prefer-rest-params": 'error',
        "prefer-arrow-callback": 'error',
        "no-nested-ternary": 'error',
        "no-unneeded-ternary": 'error',
        "nonblock-statement-body-position": 'error',
        "brace-style": 'error',
        "no-else-return": 'error',
        "padded-blocks": ["error", "never"],
        "comma-dangle": ["error", "never"],
        "@typescript-eslint/explicit-member-accessibility": "off",
        "id-length": ["error"],
        "camelcase": ["error"],
        "no-restricted-globals": [
            "error",
            {
                "name": "isFinite",
                "message": "使用 Number.isFinite 代替全局的 isFinite"
            }
        ],
        "no-multiple-empty-lines": ["error", {
            "max": 1
        }],
        "max-lines": ["error", 500],
        "no-console": "error",
        "no-shadow": "error",
        "no-invalid-this": 0,
        'no-return-assign': 0,
        'prefer-destructuring': 0,
        "lines-between-class-members": [2],
        'camelcase': 0,
        "react/self-closing-comp": 'error'
    }
}